fix(runtime-tags): correctly link control-flow branches on resume#3268
fix(runtime-tags): correctly link control-flow branches on resume#3268DylanPiercey wants to merge 1 commit into
Conversation
🦋 Changeset detectedLatest commit: af9da0f The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3268 +/- ##
=======================================
Coverage 94.20% 94.21%
=======================================
Files 382 382
Lines 50178 50210 +32
Branches 3745 3745
=======================================
+ Hits 47271 47303 +32
Misses 2882 2882
Partials 25 25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (171)
📒 Files selected for processing (129)
✅ Files skipped from review due to trivial changes (113)
🚧 Files skipped from review as they are similar to previous changes (13)
WalkthroughThis patch fixes three resume-related bugs in 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
⚔️ Resolve merge conflicts
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/runtime-tags/src/__tests__/fixtures/for-resume-owns-branch-cleanup/test.ts (1)
3-12: 🧹 Nitpick | 🔵 Trivial | ⚡ Quick winPlace the exported test config before helper implementations.
This file is currently helper-first; move the public API (
config) to the top and keep helpers below, using function hoisting for readability.Proposed reorder
import type { TestConfig } from "../../main.test"; +export const config: TestConfig = { + steps: [{}, add, toggleOuter], +}; + function add(container: Element) { container.querySelector<HTMLButtonElement>("`#a`")!.click(); } function toggleOuter(container: Element) { container.querySelector<HTMLButtonElement>("`#o`")!.click(); } - -export const config: TestConfig = { - steps: [{}, add, toggleOuter], -};As per coding guidelines, "
**/*.{js,ts,jsx,tsx}: Organize file contents from most important to least important: Public API (exports), High-level orchestration logic, Helper functions, Low-level implementation details" and "Use function declaration hoisting to enable top-down file structure with progressive disclosure`".🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/runtime-tags/src/__tests__/fixtures/for-resume-owns-branch-cleanup/test.ts` around lines 3 - 12, The file currently defines helper functions add and toggleOuter before the exported config object, which violates the guideline to organize files from most important (public API) to least important (helpers). Move the exported config object to the top of the file and place the helper functions add and toggleOuter below it. Since these are function declarations, they will be hoisted and available to the config initialization, allowing the top-down file structure while maintaining readability.Source: Coding guidelines
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In
`@packages/runtime-tags/src/__tests__/fixtures/for-resume-owns-branch-cleanup/test.ts`:
- Around line 3-12: The file currently defines helper functions add and
toggleOuter before the exported config object, which violates the guideline to
organize files from most important (public API) to least important (helpers).
Move the exported config object to the top of the file and place the helper
functions add and toggleOuter below it. Since these are function declarations,
they will be hoisted and available to the config initialization, allowing the
top-down file structure while maintaining readability.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: df849e2f-d9c4-4d4b-9352-af8a158a098e
⛔ Files ignored due to path filters (36)
packages/runtime-tags/src/__tests__/fixtures/await-no-try-resume-rerender/__snapshots__/dom.bundle.debug.jsis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/await-no-try-resume-rerender/__snapshots__/dom.bundle.jsis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/await-no-try-resume-rerender/__snapshots__/html.bundle.debug.jsis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/await-no-try-resume-rerender/__snapshots__/html.bundle.jsis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/await-no-try-resume-rerender/__snapshots__/render-csr.debug.mdis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/await-no-try-resume-rerender/__snapshots__/render-csr.mdis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/await-no-try-resume-rerender/__snapshots__/render-ssr.debug.mdis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/await-no-try-resume-rerender/__snapshots__/render-ssr.mdis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/await-no-try-resume-rerender/__snapshots__/writes.debug.htmlis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/await-no-try-resume-rerender/__snapshots__/writes.htmlis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-resume-owns-branch-cleanup/__snapshots__/dom.bundle.debug.jsis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-resume-owns-branch-cleanup/__snapshots__/dom.bundle.jsis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-resume-owns-branch-cleanup/__snapshots__/html.bundle.debug.jsis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-resume-owns-branch-cleanup/__snapshots__/html.bundle.jsis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-resume-owns-branch-cleanup/__snapshots__/render.debug.mdis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-resume-owns-branch-cleanup/__snapshots__/render.mdis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-resume-owns-branch-cleanup/__snapshots__/writes.debug.htmlis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/dynamic-tag-resume-owns-branch-cleanup/__snapshots__/writes.htmlis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/for-resume-owns-branch-cleanup/__snapshots__/dom.bundle.debug.jsis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/for-resume-owns-branch-cleanup/__snapshots__/dom.bundle.jsis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/for-resume-owns-branch-cleanup/__snapshots__/html.bundle.debug.jsis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/for-resume-owns-branch-cleanup/__snapshots__/html.bundle.jsis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/for-resume-owns-branch-cleanup/__snapshots__/render.debug.mdis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/for-resume-owns-branch-cleanup/__snapshots__/render.mdis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/for-resume-owns-branch-cleanup/__snapshots__/writes.debug.htmlis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/for-resume-owns-branch-cleanup/__snapshots__/writes.htmlis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/if-resume-owns-branch-cleanup/__snapshots__/dom.bundle.debug.jsis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/if-resume-owns-branch-cleanup/__snapshots__/dom.bundle.jsis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/if-resume-owns-branch-cleanup/__snapshots__/html.bundle.debug.jsis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/if-resume-owns-branch-cleanup/__snapshots__/html.bundle.jsis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/if-resume-owns-branch-cleanup/__snapshots__/render.debug.mdis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/if-resume-owns-branch-cleanup/__snapshots__/render.mdis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/if-resume-owns-branch-cleanup/__snapshots__/writes.debug.htmlis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/if-resume-owns-branch-cleanup/__snapshots__/writes.htmlis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/tags-dir-recursive/__snapshots__/writes.debug.htmlis excluded by!**/__snapshots__/**and included by**packages/runtime-tags/src/__tests__/fixtures/tags-dir-recursive/__snapshots__/writes.htmlis excluded by!**/__snapshots__/**and included by**
📒 Files selected for processing (155)
.changeset/resume-branch-fixes.md.sizes.json.sizes/dom.jspackages/runtime-tags/src/__tests__/fixtures-interop/ambiguous-tags-and-components-dir/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/class/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/custom-tag-parameters-from-args/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/interop-basic-class-to-tags/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/interop-basic-tags-to-class/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/interop-class-in-components-in-tags-dir/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/interop-class-to-tags-import/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/interop-event-handler-render-body-tags-to-class/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/interop-events-tags-to-class/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/interop-nested-attr-tags-class-to-tags/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/interop-nested-class-to-tags/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/interop-nested-tags-to-class/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/interop-stateless-tags-to-class/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/interop-tag-params-class-to-tags/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/interop-tag-params-tags-to-class/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/lazy-class-child-event/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/lazy-class-child-idle/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/lazy-class-child-ssr-toggle/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/lazy-class-child-ssr/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/lazy-class-child-unmount-before-load/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/lazy-class-child-visible/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures-interop/let/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/assign-to-owner-closure/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/async-multi-resolve-in-order-and-update/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/async-state/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic-with-params/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/at-tags-dynamic/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/await-cleanup/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/await-closure-in-order/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/await-closure-within/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/await-no-try-resume-rerender/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/await-no-try-resume-rerender/template.markopackages/runtime-tags/src/__tests__/fixtures/await-no-try-resume-rerender/test.tspackages/runtime-tags/src/__tests__/fixtures/await-remove-parent/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/await-update-after-resume/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/await-update-before-resume/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter-multiple-nodes/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/basic-conditional-counter/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/basic-execution-order/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/basic-nested-for/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/basic-nested-params/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/basic-nested-scope-if/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/basic-push-pop-list/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/basic-shared-node-ref/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/basic-toggle-show/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/batched-updates-cleanup/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/body-content/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-for-shallow/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-deep/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-same-scope/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/cleanup-n-child-if-shallow/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-deep/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-for-shallow/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-deep/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-same-scope/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/cleanup-single-child-if-shallow/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/closure-serialize-reason/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/conditional-dynamic-tag-in-loop-closure/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/conditional-table-row/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/controllable-checked-many/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/controllable-checked-spread/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/controllable-checked-value-empty-spread/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/controllable-checked-value-spread/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/controllable-checked-values-spread/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/controllable-details-open-spread/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/controllable-dialog-open-spread/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/controllable-dynamic-checkbox-checked-value/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/controllable-input-value-spread/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/controllable-merged-spread/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/controllable-partial-spread/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/controllable-select-dynamic-spread/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/controllable-select-mutated-option/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/controllable-select-spread/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/controllable-textarea-value-spread/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-args/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-attributes/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/custom-tag-parameters-from-single-arg/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/define-tag-for-attribute-tag/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/define-tag-render-closure/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/define-tag-render-conditional/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/destructure-stateful-upstream-alias/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/dollar-global-client/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/dynamic-native-dynamic-tag/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/dynamic-native-tag-events/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args-tag-var/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/dynamic-tag-args/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-native/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/dynamic-tag-custom-tags/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/dynamic-tag-input-intersection/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/dynamic-tag-resume-owns-branch-cleanup/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/dynamic-tag-resume-owns-branch-cleanup/tags/child.markopackages/runtime-tags/src/__tests__/fixtures/dynamic-tag-resume-owns-branch-cleanup/template.markopackages/runtime-tags/src/__tests__/fixtures/dynamic-tag-resume-owns-branch-cleanup/test.tspackages/runtime-tags/src/__tests__/fixtures/dynamic-tag-single-arg/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/dynamic-tag-sometimes-null/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/dynamic-tag-with-updating-body/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/embed-control-flow-boundary/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/for-by-use-index/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/for-by/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/for-destructure/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/for-event-handler/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/for-resume-owns-branch-cleanup/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/for-resume-owns-branch-cleanup/tags/child.markopackages/runtime-tags/src/__tests__/fixtures/for-resume-owns-branch-cleanup/template.markopackages/runtime-tags/src/__tests__/fixtures/for-resume-owns-branch-cleanup/test.tspackages/runtime-tags/src/__tests__/fixtures/for-tag-single-node-only-child-in-parent/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/for-tag-single-text-node-with-text-before/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/for-tag-with-state/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/for-to-range-resume-key/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/getter-on-single-node-only-child/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/hoist-custom-tag-var-from-dynamic/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/hoist-dynamic-tag-var-from-dynamic/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/hoist-native-tag-var-from-dynamic/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/html-script-nonce/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/html-style-nonce/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/if-default-false/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/if-member-expression-intersection/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/if-no-content-script/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/if-resume-owns-branch-cleanup/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/if-resume-owns-branch-cleanup/tags/child.markopackages/runtime-tags/src/__tests__/fixtures/if-resume-owns-branch-cleanup/template.markopackages/runtime-tags/src/__tests__/fixtures/if-resume-owns-branch-cleanup/test.tspackages/runtime-tags/src/__tests__/fixtures/input-missing-property/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/input-spread-value-also-read/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/known-define-tag-empty-section-closure/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/known-tag-attr-tags-rest/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/let-bind-stateful-upstream-alias/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-conditional-child-cleanup/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/lifecycle-tag-conditional/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/namespaced-tags/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/native-tag-local-closures/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/native-tag-spread-content-opaque/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/native-tag-spread-void/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/nested-for-if-stateful/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/placeholder-static-multiple/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/resume-single-node/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/spread-removed-event-handler/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/spread-to-known-rest-input-with-attr-tags-deopt/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/static-content-conditional-consumer/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/tag-name-type-unions/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/tag-param-if-closure/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/tag-var-with-serialize-reason/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/tags-dir-recursive/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/toggle-nested-2/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/toggle-nested-3/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/toggle-only-child/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/toggle-stateful-component/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/try-effects-async/sizes.jsonpackages/runtime-tags/src/__tests__/fixtures/unused-dynamic-tag-body-serialize-reason/sizes.jsonpackages/runtime-tags/src/dom/control-flow.tspackages/runtime-tags/src/html/dynamic-tag.tspackages/runtime-tags/src/html/writer.ts
Link the owning scope's closest branch from the control-flow runtimes so a client-created `<if>`/`<for>`/dynamic-tag branch is not orphaned from the branch tree, which previously leaked effect and `onDestroy` cleanup when an ancestor branch was removed. Also avoid a `HierarchyRequestError` thrown when a bare `<await>` (with no enclosing `<try>`) re-resolves its promise after resume. The closest-branch link is now omitted when a branch's contents provably register no cleanup (no `$signal`/`<lifecycle>`, dynamic closure, `<await>`/ `<try>`, or custom/dynamic tag), trimming resume data for purely presentational control flow.
c96d4db to
af9da0f
Compare
Two resume fixes for control-flow branches, each with a regression fixture:
<if>,<for>, or a dynamic<${tag}>) is driven only by an input prop — with no locallet, closure reference, or$signal— resumed without its closest branch linked. A branch it then created on the client was orphaned from the branch tree, so destroying an ancestor branch failed to clean it up (effects andonDestroyleaked). The control-flow runtimes now link the owning scope's closest branch themselves when serializing a resumable branch, so the link is emitted only where a branch can actually be created on the client and is nested inside another branch.<await>re-resolution: an<await>with no enclosing<try>threwHierarchyRequestErrorwhen its promise re-resolved after resume — the re-await detach (scheduled in arequestAnimationFrame) raced the resolution, leaving the branch in place while the dismiss logic swapped the placeholder anchor for its own parent. It now drops the leftover anchor instead.Generated by Claude Code